﻿using System;
using System.Xml.Serialization;
using cndp.Model.IModel;

namespace cndp.Model
{
    /// <summary>
    /// Person - Personklassen innehåller information om en person såsom namn, kön, personnummer och nationalitet.
    /// </summary>
    [Serializable]
    [XmlInclude(typeof (Judge))]
    [XmlInclude(typeof (Diver))]
    public class Person : IPerson
    {
        #region Constructor

        public Person()
        {
            Name = Gender = PersonalCodeNumber = Nationality = "";
        }


        public Person(string name, string gender, string personalCodeNumber, string nationality)
        {
            Name = name;
            Gender = gender;
            PersonalCodeNumber = personalCodeNumber;
            Nationality = nationality;
        }

        #endregion

        #region Variabels/Properties

        [XmlElement("NAME")]
        public string Name { get; set; }

        [XmlElement("GENDER")]
        public string Gender { get; set; }

        [XmlElement("PERSONAL_CODE_NUMBER")]
        public string PersonalCodeNumber { get; set; }

        [XmlElement("NATIONALITY")]
        public string Nationality { get; set; }

        #endregion
    }
}